<?php
class ActivityTaskVo extends SzAbstractMySqlVo
{

    private $userId;
    private $position;
    private $taskType;
    private $activityId;
    private $quality;
    private $progress;
    private $isReward;
    private $createTime;

    /**
     * Initialize ActivityTaskVo.
     *
     * @param $userId
     * @param $position
     * @param $taskType
     * @param $activityId
     * @param $quality
     * @param $progress
     * @param $isReward
     * @param $createTime
     * @param boolean $isInsert default false, means for now this vo is initialized not for insert process
     * @return ActivityTaskVo
     */
    public function __construct($userId, $position, $taskType, $activityId, $quality, $progress, $isReward, $createTime, $isInsert = false) {
        $this->userId = $userId;
        $this->position = $position;
        $this->taskType = $taskType;
        $this->activityId = $activityId;
        $this->quality = $quality;
        $this->progress = $progress;
        $this->isReward = $isReward;
        $this->createTime = $createTime;

        $this->isInsert = $isInsert;
        $this->voClassName = 'ActivityTaskVo';
        $this->ormName = 'ActivityTask';
    }

    /**
     * @see SzAbstractVo::toArray
     */
    public function toArray($needEncode = false)
    {
        return array(
            'userId' => $this->getUserId(),
            'position' => $this->getPosition(),
            'taskType' => $this->getTaskType(),
            'activityId' => $this->getActivityId(),
            'quality' => $this->getQuality(),
            'progress' => $this->getProgress(),
            'isReward' => $this->getIsReward(),
            'createTime' => $this->getCreateTime(),
        );
    }

    /**
     * @see SzAbstractVo::toEntireArray
     */
    public function toEntireArray($needEncode = false)
    {
        return array(
            'userId' => $this->getUserId(),
            'position' => $this->getPosition(),
            'taskType' => $this->getTaskType(),
            'activityId' => $this->getActivityId(),
            'quality' => $this->getQuality(),
            'progress' => $this->getProgress(),
            'isReward' => $this->getIsReward(),
            'createTime' => $this->getCreateTime(),
        );
    }

    /**
     * @see SzAbstractVo::toPureArray
     */
    public function toPureArray()
    {
        return array(
            $this->getUserId(),
            $this->getPosition(),
            $this->getTaskType(),
            $this->getActivityId(),
            $this->getQuality(),
            $this->getProgress(),
            $this->getIsReward(),
            $this->getCreateTime(),
        );
    }

    public function getUserId()
    {
        return $this->userId;
    }

    public function setUserId($val)
    {
        $this->saveColumnStatus(0, $this->userId);
        $this->userId = $val;
    }

    public function getPosition()
    {
        return $this->position;
    }

    public function setPosition($val)
    {
        $this->saveColumnStatus(1, $this->position);
        $this->position = $val;
    }

    public function getTaskType()
    {
        return $this->taskType;
    }

    public function setTaskType($val)
    {
        $this->saveColumnStatus(2, $this->taskType);
        $this->taskType = $val;
    }

    public function getActivityId()
    {
        return $this->activityId;
    }

    public function setActivityId($val)
    {
        $this->saveColumnStatus(3, $this->activityId);
        $this->activityId = $val;
    }

    public function getQuality()
    {
        return $this->quality;
    }

    public function setQuality($val)
    {
        $this->saveColumnStatus(4, $this->quality);
        $this->quality = $val;
    }

    public function getProgress()
    {
        return $this->progress;
    }

    public function setProgress($val)
    {
        $this->saveColumnStatus(5, $this->progress);
        $this->progress = $val;
    }

    public function getIsReward()
    {
        return $this->isReward;
    }

    public function setIsReward($val)
    {
        $this->saveColumnStatus(6, $this->isReward);
        $this->isReward = $val;
    }

    public function getCreateTime()
    {
        return $this->createTime;
    }

    public function setCreateTime($val)
    {
        $this->saveColumnStatus(7, $this->createTime);
        $this->createTime = $val;
    }

}